package com.devunion.salon.core.model;

import javax.persistence.*;

/**
 * @author spetrakovsky
 */
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorValue("PRODUCT")
public class BaseProduct extends BaseSalonEntity {

    /**
     * Short product name.
     */
    private String name;

    private String barCode;

    private String description;

    @ManyToOne
    private Vendor vendor;

    /**
     * In our application class and departent are the same.
     */
    @ManyToOne
    private InventoryDepartment inventoryDepartment;

    private boolean taxable;

    private boolean discount;

    private boolean priceOverrides;

    private float price;

    private float markup;

    private float retailPrice;

    private String uom;

    private long qty;

    private long reorderAt;

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public float getMarkup() {
        return markup;
    }

    public void setMarkup(float markup) {
        this.markup = markup;
    }

    public float getRetailPrice() {
        return retailPrice;
    }

    public void setRetailPrice(float retailPrice) {
        this.retailPrice = retailPrice;
    }

    public String getUom() {
        return uom;
    }

    public void setUom(String uom) {
        this.uom = uom;
    }

    public long getQty() {
        return qty;
    }

    public void setQty(long qty) {
        this.qty = qty;
    }

    public long getReorderAt() {
        return reorderAt;
    }

    public void setReorderAt(long reorderAt) {
        this.reorderAt = reorderAt;
    }

    public boolean isDiscount() {
        return discount;
    }

    public void setDiscount(boolean discount) {
        this.discount = discount;
    }

    public boolean isPriceOverrides() {
        return priceOverrides;
    }

    public void setPriceOverrides(boolean priceOverrides) {
        this.priceOverrides = priceOverrides;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBarCode() {
        return barCode;
    }

    public void setBarCode(String barCode) {
        this.barCode = barCode;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Vendor getVendor() {
        return vendor;
    }

    public void setVendor(Vendor vendor) {
        this.vendor = vendor;
    }

    public InventoryDepartment getInventoryDepartment() {
        return inventoryDepartment;
    }

    public void setInventoryDepartment(InventoryDepartment inventoryDepartment) {
        this.inventoryDepartment = inventoryDepartment;
    }

    public boolean isTaxable() {
        return taxable;
    }

    public void setTaxable(boolean taxable) {
        this.taxable = taxable;
    }
}
